/*!\file preheader.h
*/

/*! \page page1 Read me first!
There are some issues before you start you program use this module.

\section sec1  Setup IDE
Before you start, you need sure:
- you must use Microsoft Visual C++ version 6.0 or later 
- you must compile your application with the multithreaded DLL C-runtime library. To accomplish this, make the following settings under Settings of the Project menu: 
	-# C/C++ / Code Generation / Use run-time library should be set to Multithreaded-DLL (either Debug or not). 
	-# Link / General / Ignore all default libraries should be on. 
	-# Link / General / Object/ library modules should include Msvcrt.lib (or Msvcrtd.lib) and Wmvcore.lib. It should not include Libc.lib or any variation. 
\subsection subsection2 The second subsection

*/




#ifndef FFPREHEADER_H_H_
#define FFPREHEADER_H_H_


#define ff_ok           (1)   ///<ok
#define fferr_unknown   (-1)  ///< unknonw error
#define fferr_arg       (-2)  ///< argument error
#define fferr_io        (-3)  ///< io error
#define fferr_mem       (-4)  ///< memory error
#define fferr_file      (-5)  ///< file error
#define fferr_fmt       (-6)  ///< format error
#define fferr_codec_para    (-7)  ///< codec parameter error;


////////////////////////////////////////////////////////////////////////////////


/*!
* Return TRUE if val is a prefix of str. If it returns TRUE, ptr is
* set to the next character in 'str' after the prefix.
*
* \param str input string
* \param val prefix to test
* \param ptr updated after the prefix in str in there is a match
* \return TRUE if there is a match
*/
int   strstart(const char *str, const char *val, const char **ptr);

/*!
* Return TRUE if val is a prefix of str (case independent). If it
* returns TRUE, ptr is set to the next character in 'str' after the
* prefix.
*
* \param str input string
* \param val prefix to test
* \param ptr updated after the prefix in str in there is a match
* \return TRUE if there is a match */
int   stristart(const char *str, const char *val, const char **ptr);

/*!
* Copy the string str to buf. If str length is bigger than buf_size -
* 1 then it is clamped to buf_size - 1.
* NOTE: this function does what strncpy should have done to be
* useful. NEVER use strncpy.
*
* \param buf destination buffer
* \param buf_size size of destination buffer
* \param str source string
*/
void  pstrcpy(char *buf, int buf_size, const char *str);

/*!
* strcat and truncate.
*\param
*\return
*	
*\sa
*/
char* pstrcat(char *buf, int buf_size, const char *s);



































#endif